<fieldset >
    <legend>Thông tin giảng viên</legend>
    Tên giảng viên : <strong><?php echo $user->name; ?></strong><br/>
    Các môn giảng dạy : <br/>
    <?php if($classInfo->getSize() > 0)
    {
        
        $size = $classInfo->getSize();
        ?>
        <table border="1" cellpadding="3" style="width:100%;">
            <thead>
                <th>Mã lớp</th>
                <th>Mã môn</th>
                <th>Tên môn</th>
                <th>Kì</th>
                <th>Tình trạng</th>
            </thead>
            <?php for($i = 0; $i < $size; $i++)
                    {
                        $row = $classInfo->getRow($i);

                        ?>
                        <tr>
                            <td style="text-align:center"><?php echo $row->classid;?></td>
                            <td style="text-align:center"><?php echo $row->subjectid;?></td>
                            <td style="text-align:center"><?php echo $row->subname;?></td>
                            <td style="text-align:center"><?php echo $row->semester;?></td>
                            <td style="text-align:center"><?php echo ($row->isfinished == 0) ? "Chưa hoàn thành" : "Đã hoàn thành";?></td>
                        </tr>
                        <?php
                    }
                    ?>
        </table>
        <?php
    }
    else
    {
        echo "Hiện chưa có";
    }
    ?>
</fieldset>
    <br /><br/>
    <div align="center">
        <form action="<?php echo Utility::getSiteUrl();?>/result/search/" method="post">
        <fieldset>
            <legend>Tìm kiếm</legend>
    <table style="width:100%">
        <tr>
            <td>Tên môn học <input type="text" name="subject_name" value="<?php if(isset($search['subject_name'])) echo $search['subject_name'];?>" /> </td>
            <td>Mã lớp <input type="text" name="class_id"
                              value="<?php if(isset($search['class_id'])) echo $search['class_id'];?>"/></td>
            <td>Tên sinh viên <input type="text" name="student_name"
                              value="<?php if(isset($search['student_name'])) echo $search['student_name'];?>"/></td>
            <td>Mã sinh viên <input type="text" name="student_id"
                                    value="<?php if(isset($search['student_id'])) echo $search['student_id'];?>"/></td>
        </tr>
        <tr>
            <td><input type="submit" name="submit" value="Tìm kiếm"/></td>
        </tr>
    </table>
        </fieldset>
        </form>
        <br />
        <?php
        if(isset($result))
        {
        ?>
        <table border="1" style="width:100%">
            <thead>
                <th>Mã SV</th>
                <th>Tên sinh viên</th>
                <th>Mã lớp</th>
                <th>Tên môn học</th>
                <th>Điểm</th>
            </thead>
        <tbody>
        <?php
            $size = $result->getSize();
            if($size > 0)
            {
                for($i = 0; $i < $size;$i++)
                {
                    $row = $result->getRow($i);
                    ?>
                    <tr>
                        <td style="text-align:center"><?php echo $row->uid; ?></td>
                        <td style="text-align:center"><?php echo $row->uname; ?></td>
                        <td style="text-align:center"><?php echo $row->class_id; ?></td>
                        <td style="text-align:center"><?php echo $row->sub_name; ?></td>
                        <td style="text-align:center"><?php echo $row->mark; ?></td>
                    </tr>
                    <?php
                }
                ?>
        <tr>
            <td colspan="5" style="text-align: right;">
                <strong><a
                    href="<?php echo Utility::getSiteUrl() . '/result/export/' . ((isset($current_action) && $current_action == 'search') ? 'search/' . $queryString : '')?>">Xuất
                    ra tệp .doc </a></strong><br/>
            </td>
        </tr>
                <?php
            }
            else
            {
                ?>
                <tr>
                    <td colspan="5" align="center">Không tìm thấy bản ghi nào thỏa mãn</td>
                </tr>
                <?php
            }
        }
        ?>


        </tbody>
        </table>
    </div>